package com.hy.opensles

/**
 * @Description: OpenSl ES 录制 pcm音频接口
 * @Author: wdk
 * @CreateTime: 2024/12/19 22:28
 */
class HYOpenSlRecorder {

    companion object {
        // Used to load the 'opensles' library on application startup.
        init {
            System.loadLibrary("hyOpenSles")
        }
    }


    //创建音频录制实例，返回示例指针地址
    external fun CreateInstance(): Long

    //初始化opensl es
    external fun Init(handler: Long):Int

    //传入需要保存的音频地址开始音频录制
    external fun StartRecord(handler: Long, audioPath: String)

    //停止音频录制
    external fun StopRecord(handler: Long)

    //释放opensl es实例
    external fun Release(handler: Long)
}